package com.zitangkou.user.req.user;

import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * 用户注册请求参数类
 *
 * @author Deng Ningning
 * @version 1.0
 * @date 2020/8/19 11:52
 */
@Data
@Accessors(chain = true)
public class ForgotPasswordReq {
    /**
     * 密码
     */
    @NotBlank(message = "密码不能为空")
    @Size(min = 8, message = "密码至少8位！")
    @Pattern(regexp = "([a-zA-Z0-9]*)", message = "密码必须是大小写字母和数字组合")
    private String userPwd;
    /**
     * 手机号码
     */
    @NotBlank(message = "手机号码不能为空")
    @Pattern(regexp = "(13|14|15|16|17|18|19)\\d{9}", message = "手机号码格式错误")
    private String mobile;
    /**
     * 短信验证码
     */
    @NotBlank(message = "短信验证码不能为空")
    private String mobileCode;
}
